package com.google.code.chaotic.model;

import java.io.Serializable;

import org.apache.commons.lang.ObjectUtils;

@SuppressWarnings("serial")
public class HabitWaypointPk implements Serializable {

	public String commutingHabitId;

	public Integer sequenceNo;

	//

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((commutingHabitId == null) ? 0 : commutingHabitId.hashCode());
		result = prime * result
				+ ((sequenceNo == null) ? 0 : sequenceNo.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof HabitWaypointPk))
			return false;
		HabitWaypointPk other = (HabitWaypointPk) obj;
		if (ObjectUtils.equals(commutingHabitId, other.commutingHabitId))
			return false;
		if (ObjectUtils.equals(sequenceNo, other.sequenceNo))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return new StringBuilder().append("Waypoint: ( ").append(
				"commutingHabitId: ").append(commutingHabitId).append(
				", sequenceNo: ").append(sequenceNo).append(" )").toString();
	}

	// public void setCommutingHabitId(String commutingHabitId) {
	// this.commutingHabitId = commutingHabitId;
	// }
	//
	// public String getCommutingHabitId() {
	// return commutingHabitId;
	// }
	//
	// public void setSequenceNo(Integer sequenceNo) {
	// this.sequenceNo = sequenceNo;
	// }
	//
	// public Integer getSequenceNo() {
	// return sequenceNo;
	// }

}